package com.brillilab.service.module.message.template.impl.reagent;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: SingleReagentToOtherTemp
 * @ProjectName brill_lab
 * @Description: 单个试剂被管理员移交给其他人-被移交用户
 * @date 2019/5/27 17:18
 */
@Data
public class SingleReagentToOtherTemp extends AbstractMessageTemplate {
    private String savePath;
    private String reagentName;
    private String operatorName;
    private String targetUserName;

    /**
     * 单个试剂被管理员移交给其他人-被移交用户
     *
     * @param labId          实验ID
     * @param receiverId     接收人ID
     * @param labMemberId    接收者实验室成员Id
     * @param savePath       试剂保存路径
     * @param reagentName    试剂名称
     * @param operatorName   操作人姓名
     * @param targetUserName 移交目标用户姓名
     */
    public SingleReagentToOtherTemp(Long labId, Long receiverId,Long labMemberId, String savePath, String reagentName, String operatorName, String targetUserName) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.SingleReagentToOther.getValue());
        super.setTitle("您的试剂已被移交");
        String content = String.format("<span>位于</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>已被</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>移交给</span>" +
                        "<span style='color:#F6AC2D'>%s</span>",
                savePath, reagentName, operatorName,targetUserName);
        super.setContent(content);
        super.setAppContent(String.format("位于%s的%s已被%s移交给%s",savePath, reagentName, operatorName,targetUserName));
        this.labMemberId=labMemberId;
        this.savePath = savePath;
        this.reagentName = reagentName;
        this.operatorName = operatorName;
        this.targetUserName = targetUserName;
    }

}
